<script setup>
import { onLaunch } from '@dcloudio/uni-app';
import config from '@/config/config';
import data from '@/pages.json'
onLaunch(() => {
	if(data?.tabBar && data?.tabBar?.list && data?.tabBar?.list.length > 0){
		uni.hideTabBar()
	}
	if (process.env.NODE_ENV === 'development') {
		// 开发环境 运行
		// config.baseUrl = location.origin; // vite.config.ts的配置代理服务，解决跨域
	} else {
		// 生产环境 发行
		config.baseUrl = config.productionUrl;
	}
});

</script>
<style lang="scss">
/* 全局样式 */
body, #app {
  background-image: url('./static/1111.png'); /* 背景图片路径 */
  background-size: cover; /* 背景图片覆盖整个页面 */
  background-position: center; /* 背景图片居中 */
  height: 100%; /* 高度设置为100% */
  width: 100%; /* 宽度设置为100% */
  position: fixed; /* 固定定位 */
  top: 0;
  left: 0;
  z-index: -1; /* 确保背景在其他内容之下 */
}
view {
	user-select: text;
}
.uni-app--showleftwindow uni-main {
	position: relative;
}
.uni-app--showleftwindow uni-page-wrapper {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	padding: 15px;
	overflow-y: auto;
	box-sizing: border-box;
	background-color: #f5f5f5;
}

.uni-app--showleftwindow uni-page-body {
	width: auto;
	min-height: 100%;
	box-sizing: border-box;
	border-radius: 5px;
	box-shadow: -1px -1px 5px 0 rgba(0, 0, 0, 0.1);
	background-color: #fff;
	position: relative;
	padding: 20px;
}

.yq-flex-row{
	display: flex;
	flex-direction: row;
}
.yq-flex-col{
	display: flex;
	flex-direction: column;
}
.yq-justify-start{
	justify-content: flex-start;
}
.yq-justify-end{
	justify-content: flex-end;
}
.yq-justify-center{
	justify-content: center;
}
.yq-justify-around{
	justify-content: space-around;
}
.yq-justify-between{
	justify-content: space-between;
}
.yq-flex-wrap{
	flex-wrap: wrap;
}
.yq-items-start{
	align-items: flex-start;
}
.yq-items-end{
	align-items: flex-end;
}
.yq-items-center{
	align-items: center;
}
.yq-text-center{
	text-align: center;
}
.yq-relative{
	position: relative;
}
.yq-absolute{
	position: absolute;
}
.yq-cor-fff{
	color: #ffffff;
}
.yq-bg-fff{
	background: #ffffff;
}
// 定义内外边距，历遍1-80
@for $i from 0 through 80 {
	// 只要双数和能被5除尽的数
	@if $i % 2 == 0 or $i % 5 == 0 {
		// 得出：yq-margin-30
		.yq-margin-#{$i}{
			margin: $i + px!important;
		}
		
		// 得出：yq-padding-30
		.yq-padding-#{$i} {
			padding: $i + px!important;
		}
		
		@each $short, $long in l left, t top, r right, b bottom {

			// 结果如：yq-margin-left-30
			// 定义外边距
			.yq-margin-#{$long}-#{$i} {
				margin-#{$long}: $i + px!important;
			}
			
			// 定义内边距
			.yq-padding-#{$long}-#{$i} {
				padding-#{$long}: $i + px!important;
			}
		}
	}
}

</style>
